home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / sptsvx.z / sptsvx
Encoding:
Text File  |  2002-10-03  |  7.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SPTSVX - use the factorization A = L*D*L**T to compute the solution to a
  10.      real system of linear equations A*X = B, where A is an N-by-N symmetric
  11.      positive definite tridiagonal matrix and X and B are N-by-NRHS matrices
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      SUBROUTINE SPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX, RCOND,
  15.                         FERR, BERR, WORK, INFO )
  16.  
  17.          CHARACTER      FACT
  18.  
  19.          INTEGER        INFO, LDB, LDX, N, NRHS
  20.  
  21.          REAL           RCOND
  22.  
  23.          REAL           B( LDB, * ), BERR( * ), D( * ), DF( * ), E( * ), EF( *
  24.                         ), FERR( * ), WORK( * ), X( LDX, * )
  25.  
  26. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  27.      These routines are part of the SCSL Scientific Library and can be loaded
  28.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  29.      directs the linker to use the multi-processor version of the library.
  30.  
  31.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  32.      4 bytes (32 bits). Another version of SCSL is available in which integers
  33.      are 8 bytes (64 bits).  This version allows the user access to larger
  34.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  35.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  36.      only one of the two versions; 4-byte integer and 8-byte integer library
  37.      calls cannot be mixed.
  38.  
  39. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  40.      SPTSVX uses the factorization A = L*D*L**T to compute the solution to a
  41.      real system of linear equations A*X = B, where A is an N-by-N symmetric
  42.      positive definite tridiagonal matrix and X and B are N-by-NRHS matrices.
  43.      Error bounds on the solution and a condition estimate are also provided.
  44.  
  45.  
  46. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  47.      The following steps are performed:
  48.  
  49.      1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
  50.         is a unit lower bidiagonal matrix and D is diagonal.  The
  51.         factorization can also be regarded as having the form
  52.         A = U**T*D*U.
  53.  
  54.      2. If the leading i-by-i principal minor is not positive definite,
  55.         then the routine returns with INFO = i. Otherwise, the factored
  56.         form of A is used to estimate the condition number of the matrix
  57.         A.  If the reciprocal of the condition number is less than machine
  58.         precision, INFO = N+1 is returned as a warning, but the routine
  59.         still goes on to solve for X and compute error bounds as
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.         described below.
  75.  
  76.      3. The system of equations is solved for X using the factored form
  77.         of A.
  78.  
  79.      4. Iterative refinement is applied to improve the computed solution
  80.         matrix and calculate error bounds and backward error estimates
  81.         for it.
  82.  
  83.  
  84. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  85.      FACT    (input) CHARACTER*1
  86.              Specifies whether or not the factored form of A has been supplied
  87.              on entry.  = 'F':  On entry, DF and EF contain the factored form
  88.              of A.  D, E, DF, and EF will not be modified.  = 'N':  The matrix
  89.              A will be copied to DF and EF and factored.
  90.  
  91.      N       (input) INTEGER
  92.              The order of the matrix A.  N >= 0.
  93.  
  94.      NRHS    (input) INTEGER
  95.              The number of right hand sides, i.e., the number of columns of
  96.              the matrices B and X.  NRHS >= 0.
  97.  
  98.      D       (input) REAL array, dimension (N)
  99.              The n diagonal elements of the tridiagonal matrix A.
  100.  
  101.      E       (input) REAL array, dimension (N-1)
  102.              The (n-1) subdiagonal elements of the tridiagonal matrix A.
  103.  
  104.      DF      (input or output) REAL array, dimension (N)
  105.              If FACT = 'F', then DF is an input argument and on entry contains
  106.              the n diagonal elements of the diagonal matrix D from the
  107.              L*D*L**T factorization of A.  If FACT = 'N', then DF is an output
  108.              argument and on exit contains the n diagonal elements of the
  109.              diagonal matrix D from the L*D*L**T factorization of A.
  110.  
  111.      EF      (input or output) REAL array, dimension (N-1)
  112.              If FACT = 'F', then EF is an input argument and on entry contains
  113.              the (n-1) subdiagonal elements of the unit bidiagonal factor L
  114.              from the L*D*L**T factorization of A.  If FACT = 'N', then EF is
  115.              an output argument and on exit contains the (n-1) subdiagonal
  116.              elements of the unit bidiagonal factor L from the L*D*L**T
  117.              factorization of A.
  118.  
  119.      B       (input) REAL array, dimension (LDB,NRHS)
  120.              The N-by-NRHS right hand side matrix B.
  121.  
  122.      LDB     (input) INTEGER
  123.              The leading dimension of the array B.  LDB >= max(1,N).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))                                                          SSSSPPPPTTTTSSSSVVVVXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      X       (output) REAL array, dimension (LDX,NRHS)
  141.              If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
  142.  
  143.      LDX     (input) INTEGER
  144.              The leading dimension of the array X.  LDX >= max(1,N).
  145.  
  146.      RCOND   (output) REAL
  147.              The reciprocal condition number of the matrix A.  If RCOND is
  148.              less than the machine precision (in particular, if RCOND = 0),
  149.              the matrix is singular to working precision.  This condition is
  150.              indicated by a return code of INFO > 0.
  151.  
  152.      FERR    (output) REAL array, dimension (NRHS)
  153.              The forward error bound for each solution vector X(j) (the j-th
  154.              column of the solution matrix X).  If XTRUE is the true solution
  155.              corresponding to X(j), FERR(j) is an estimated upper bound for
  156.              the magnitude of the largest element in (X(j) - XTRUE) divided by
  157.              the magnitude of the largest element in X(j).
  158.  
  159.      BERR    (output) REAL array, dimension (NRHS)
  160.              The componentwise relative backward error of each solution vector
  161.              X(j) (i.e., the smallest relative change in any element of A or B
  162.              that makes X(j) an exact solution).
  163.  
  164.      WORK    (workspace) REAL array, dimension (2*N)
  165.  
  166.      INFO    (output) INTEGER
  167.              = 0:  successful exit
  168.              < 0:  if INFO = -i, the i-th argument had an illegal value
  169.              > 0:  if INFO = i, and i is
  170.              <= N:  the leading minor of order i of A is not positive
  171.              definite, so the factorization could not be completed, and the
  172.              solution has not been computed. RCOND = 0 is returned.  = N+1: U
  173.              is nonsingular, but RCOND is less than machine precision, meaning
  174.              that the matrix is singular to working precision.  Nevertheless,
  175.              the solution and error bounds are computed because there are a
  176.              number of situations where the computed solution can be more
  177.              accurate than the value of RCOND would suggest.
  178.  
  179. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  180.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  181.  
  182.      This man page is available only online.
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.